import xlrd
wb = xlrd.open_workbook(filename=r"D:\FlowerRecognition\pytest1\calc测试数据.xls")
sheet1 = wb.sheet_by_index(0)
print("总共：",sheet1.nrows)
sheet2 = wb.sheet_by_index(1)
print("总共：",sheet2.nrows)
sheet3 = wb.sheet_by_index(2)
print("总共：",sheet3.nrows)
sheet4 = wb.sheet_by_index(3)
print("总共：",sheet4.nrows)
def read_add_data():

    data1=[]
    for i in range(1,sheet1.nrows):
        data1.append(sheet1.row_values(i)[0:3])
    return data1
def read_sub_data():

    data2 = []
    for i in range(1, sheet2.nrows):
        data2.append(sheet2.row_values(i)[0:3])
    return data2
def read_mul_data():
    data3 = []
    for i in range(1, sheet3.nrows):
        data3.append(sheet3.row_values(i)[0:3])
    return data3
def read_div_data():
    data4 = []
    for i in range(1, sheet4.nrows):
        data4.append(sheet4.row_values(i)[0:3])
    return data4

print(read_add_data())
print(read_sub_data())
print(read_mul_data())
print(read_div_data())